<?php namespace My\Field\Quan;

class Fabushezhi extends \Phpcmf\Library\A_Field {
	
	/**
     * 构造函数
     */
    public function __construct() {
        parent::__construct();
		$this->fieldtype = ['TEXT' => '']; // TRUE表全部可用字段类型,自定义格式为 array('可用字段类型名称' => '默认长度', ... )
		$this->defaulttype = 'TEXT'; // 当用户没有选择字段类型时的缺省值
    }
	
	/**
	 * 字段相关属性参数
	 *
	 * @param	array	$value	值
	 * @return  string
	 */
	public function option($option) {

		return [''];
	}

    /**
     * 创建sql语句
     */
	/*public function create_sql($name, $value, $cname = '') {
	    $sql = 'ALTER TABLE `{tablename}` ADD `'.$name.'` TEXT NULL , ADD `'.$cname.'` TEXT NULL';
	    return $sql;
	}*/

    /**
     * 修改sql语句
     */
    public function alter_sql($name, $value, $cname = '') {
        return NULL;
    }

    /**
     * 删除sql语句
     */
    public function drop_sql($name) {
        return 'ALTER TABLE `{tablename}` DROP `'.$name.'`';
    }
	
	/**
	 * 字段输出
	 */
	public function output($value) {
		return $value;
	}
	
	/**
	 * 字段入库值
	 */
	public function insert_value($field) {
		$zus = \Phpcmf\Service::L('field')->post[$field['fieldname']];
		if($zus) {
			$zu = [
			'fatie' => $zus['fatie'],
			'fufei' => $zus['fufei'],
			'wenda' => $zus['wenda'],
			'jiugetu' => $zus['jiugetu'],
			'yuyin' => $zus['yuyin'],
			'shipin' => $zus['shipin'],
			'mpsan' => $zus['mpsan'],
			'toupiao' => $zus['toupiao'],
			'shangpin' => $zus['shangpin'],
			'bisai' => $zus['bisai'],
			'xiazai' => $zus['xiazai'],
			'pk' => $zus['pk'],
			'huodong' => $zus['huodong'],
			'chuzu' => $zus['chuzu'],
			'qiuzu' => $zus['qiuzu'],
			'zhaopin' => $zus['zhaopin'],
			'qiuzhi' => $zus['qiuzhi'],
			];
			
			\Phpcmf\Service::L('field')->data[$field['ismain']][$field['fieldname']] = dr_array2string($zu);
		}
		

	}

    /**
     * 字段表单输入
     *
     * @return  string
     */
    public function input($field, $value = []) {

        // 字段禁止修改时就返回显示字符串
        /*if ($this->_not_edit($field, $value)) {
            return $this->show($field, $value);
        }*/

        // 字段存储名称
        $name = $field['fieldname'];

        // 字段显示名称
        //$text = ($field['setting']['validate']['required'] ? '<span class="required" aria-required="true"> * </span>' : '').$field['name'];

        // 表单附加参数
        $attr = $field['setting']['validate']['formattr'];

        // 字段提示信息
        $tips = ($name == 'title' && APP_DIR) || $field['setting']['validate']['tips'] ? '<span class="help-block" id="dr_'.$field['fieldname'].'_tips">'.$field['setting']['validate']['tips'].'</span>' : '';

        // 是否必填
        $required =  $field['setting']['validate']['required'] ? ' required="required"' : '';



        // 字段默认值
        $value = dr_string2array(\Phpcmf\Service::L('Field')->value[$field['fieldname']]);
	

        // 表单选项
        //$str = '<label><select '.$required.' class="form-control '.$field['setting']['option']['css'].'" name="data['.$name.']" id="dr_'.$name.'_ting" '.$attr.' >';
        //$str.= '<option value="0">'.dr_lang('选择分类').'</option>';
        //$options = \Phpcmf\Service::M('content', 'www')->son_type(\Phpcmf\Service::C()->index['son_type']);
		$wo = \Phpcmf\Service::C()->index['uid'];
		$uid = \Phpcmf\Service::C()->uid;

		$strs.= '
		
		<div class="form-group" rs="is_admin" id="dr_'.$name.'_fatie">
		    <label class="control-label col-md-2">帖子发布</label>
			<div class="col-md-10">
				<div class="mt-radio-inline">
					<label class="mt-radio mt-radio-outline"><input type="radio" name="data['.$name.'][fatie]" value="0" '.(0 == $value['fatie'] ? ' checked' : '').'> 开启(所有用户) <span></span> 
					</label>
					<label class="mt-radio mt-radio-outline"><input type="radio" name="data['.$name.'][fatie]" value="1" '.(1 == $value['fatie'] ? ' checked' : '').'> 开启(本圈用户) <span></span>
					</label>
					<label class="mt-radio mt-radio-outline"><input type="radio" name="data['.$name.'][fatie]" value="2" '.(2 == $value['fatie'] ? ' checked' : '').'> 关闭 <span></span>
					</label>
					<label class="mt-radio mt-radio-outline"><input type="radio" name="data['.$name.'][fatie]" value="3" '.(3 == $value['fatie'] ? ' checked' : '').'> 只限圈主 <span></span> 
					</label>
					<label class="mt-radio mt-radio-outline"><input type="radio" name="data['.$name.'][fatie]" value="4" '.(4 == $value['fatie'] ? ' checked' : '').'> 只限圈主 和 户组设置 <span></span>
					</label>
				</div>
			</div>
		</div>
		<div class="form-group" rs="is_admin" id="dr_'.$name.'_jiugetu">
		    <label class="control-label col-md-2">九格图发布</label>
			<div class="col-md-10">
				<div class="mt-radio-inline">
					<label class="mt-radio mt-radio-outline"><input type="radio" name="data['.$name.'][jiugetu]" value="0" '.(0 == $value['jiugetu'] ? ' checked' : '').'> 开启(所有用户) <span></span> 
					</label>
					<label class="mt-radio mt-radio-outline"><input type="radio" name="data['.$name.'][jiugetu]" value="1" '.(1 == $value['jiugetu'] ? ' checked' : '').'> 开启(本圈用户) <span></span>
					</label>
					<label class="mt-radio mt-radio-outline"><input type="radio" name="data['.$name.'][jiugetu]" value="2" '.(2 == $value['jiugetu'] ? ' checked' : '').'> 关闭 <span></span>
					</label>
					<label class="mt-radio mt-radio-outline"><input type="radio" name="data['.$name.'][jiugetu]" value="3" '.(3 == $value['jiugetu'] ? ' checked' : '').'> 只限圈主 <span></span> 
					</label>
					<label class="mt-radio mt-radio-outline"><input type="radio" name="data['.$name.'][jiugetu]" value="4" '.(4 == $value['jiugetu'] ? ' checked' : '').'> 只限圈主 和 户组设置 <span></span>
					</label>
				</div>
			</div>
		</div>
		<div class="form-group" rs="is_admin" id="dr_'.$name.'_yuyin">
		    <label class="control-label col-md-2">语音发布</label>
			<div class="col-md-10">
				<div class="mt-radio-inline">
					<label class="mt-radio mt-radio-outline"><input type="radio" name="data['.$name.'][yuyin]" value="0" '.(0 == $value['yuyin'] ? ' checked' : '').'> 开启(所有用户) <span></span> 
					</label>
					<label class="mt-radio mt-radio-outline"><input type="radio" name="data['.$name.'][yuyin]" value="1" '.(1 == $value['yuyin'] ? ' checked' : '').'> 开启(本圈用户) <span></span>
					</label>
					<label class="mt-radio mt-radio-outline"><input type="radio" name="data['.$name.'][yuyin]" value="2" '.(2 == $value['yuyin'] ? ' checked' : '').'> 关闭 <span></span>
					</label>
					<label class="mt-radio mt-radio-outline"><input type="radio" name="data['.$name.'][yuyin]" value="3" '.(3 == $value['yuyin'] ? ' checked' : '').'> 只限圈主 <span></span> 
					</label>
					<label class="mt-radio mt-radio-outline"><input type="radio" name="data['.$name.'][yuyin]" value="4" '.(4 == $value['yuyin'] ? ' checked' : '').'> 只限圈主 和 户组设置 <span></span>
					</label>
				</div>
			</div>
		</div>
		<div class="form-group" rs="is_admin" id="dr_'.$name.'_shipin">
		    <label class="control-label col-md-2">视频发布</label>
			<div class="col-md-10">
				<div class="mt-radio-inline">
					<label class="mt-radio mt-radio-outline"><input type="radio" name="data['.$name.'][shipin]" value="0" '.(0 == $value['shipin'] ? ' checked' : '').'> 开启(所有用户) <span></span> 
					</label>
					<label class="mt-radio mt-radio-outline"><input type="radio" name="data['.$name.'][shipin]" value="1" '.(1 == $value['shipin'] ? ' checked' : '').'> 开启(本圈用户) <span></span>
					</label>
					<label class="mt-radio mt-radio-outline"><input type="radio" name="data['.$name.'][shipin]" value="2" '.(2 == $value['shipin'] ? ' checked' : '').'> 关闭 <span></span>
					</label>
					<label class="mt-radio mt-radio-outline"><input type="radio" name="data['.$name.'][shipin]" value="3" '.(3 == $value['shipin'] ? ' checked' : '').'> 只限圈主 <span></span> 
					</label>
					<label class="mt-radio mt-radio-outline"><input type="radio" name="data['.$name.'][shipin]" value="4" '.(4 == $value['shipin'] ? ' checked' : '').'> 只限圈主 和 户组设置 <span></span>
					</label>
				</div>
			</div>
		</div>
		<div class="form-group" rs="is_admin" id="dr_'.$name.'_toupiao">
		    <label class="control-label col-md-2">投票发布</label>
			<div class="col-md-10">
				<div class="mt-radio-inline">
					<label class="mt-radio mt-radio-outline"><input type="radio" name="data['.$name.'][toupiao]" value="0" '.(0 == $value['toupiao'] ? ' checked' : '').'> 开启(所有用户) <span></span> 
					</label>
					<label class="mt-radio mt-radio-outline"><input type="radio" name="data['.$name.'][toupiao]" value="1" '.(1 == $value['toupiao'] ? ' checked' : '').'> 开启(本圈用户) <span></span>
					</label>
					<label class="mt-radio mt-radio-outline"><input type="radio" name="data['.$name.'][toupiao]" value="2" '.(2 == $value['toupiao'] ? ' checked' : '').'> 关闭 <span></span>
					</label>
					<label class="mt-radio mt-radio-outline"><input type="radio" name="data['.$name.'][toupiao]" value="3" '.(3 == $value['toupiao'] ? ' checked' : '').'> 只限圈主 <span></span> 
					</label>
					<label class="mt-radio mt-radio-outline"><input type="radio" name="data['.$name.'][toupiao]" value="4" '.(4 == $value['toupiao'] ? ' checked' : '').'> 只限圈主 和 户组设置 <span></span>
					</label>
				</div>
			</div>
		</div>
		<div class="form-group" rs="is_admin" id="dr_'.$name.'_mpsan">
		    <label class="control-label col-md-2">MP3发布</label>
			<div class="col-md-10">
				<div class="mt-radio-inline">
					<label class="mt-radio mt-radio-outline"><input type="radio" name="data['.$name.'][mpsan]" value="0" '.(0 == $value['mpsan'] ? ' checked' : '').'> 开启(所有用户) <span></span> 
					</label>
					<label class="mt-radio mt-radio-outline"><input type="radio" name="data['.$name.'][mpsan]" value="1" '.(1 == $value['mpsan'] ? ' checked' : '').'> 开启(本圈用户) <span></span>
					</label>
					<label class="mt-radio mt-radio-outline"><input type="radio" name="data['.$name.'][mpsan]" value="2" '.(2 == $value['mpsan'] ? ' checked' : '').'> 关闭 <span></span>
					</label>
					<label class="mt-radio mt-radio-outline"><input type="radio" name="data['.$name.'][mpsan]" value="3" '.(3 == $value['mpsan'] ? ' checked' : '').'> 只限圈主 <span></span> 
					</label>
					<label class="mt-radio mt-radio-outline"><input type="radio" name="data['.$name.'][mpsan]" value="4" '.(4 == $value['mpsan'] ? ' checked' : '').'> 只限圈主 和 户组设置 <span></span>
					</label>
				</div>
			</div>
		</div>
		<div class="form-group" rs="is_admin" id="dr_'.$name.'_fufei">
		    <label class="control-label col-md-2">付费发布</label>
			<div class="col-md-10">
				<div class="mt-radio-inline">
					<label class="mt-radio mt-radio-outline"><input type="radio" name="data['.$name.'][fufei]" value="0" '.(0 == $value['fufei'] ? ' checked' : '').'> 开启(所有用户) <span></span> 
					</label>
					<label class="mt-radio mt-radio-outline"><input type="radio" name="data['.$name.'][fufei]" value="1" '.(1 == $value['fufei'] ? ' checked' : '').'> 开启(本圈用户) <span></span>
					</label>
					<label class="mt-radio mt-radio-outline"><input type="radio" name="data['.$name.'][fufei]" value="2" '.(2 == $value['fufei'] ? ' checked' : '').'> 关闭 <span></span>
					</label>
					<label class="mt-radio mt-radio-outline"><input type="radio" name="data['.$name.'][fufei]" value="3" '.(3 == $value['fufei'] ? ' checked' : '').'> 只限圈主 <span></span> 
					</label>
					<label class="mt-radio mt-radio-outline"><input type="radio" name="data['.$name.'][fufei]" value="4" '.(4 == $value['fufei'] ? ' checked' : '').'> 只限圈主 和 户组设置 <span></span>
					</label>
				</div>
			</div>
		</div>
		<div class="form-group" rs="is_admin" id="dr_'.$name.'_wenda">
		    <label class="control-label col-md-2">问答发布</label>
			<div class="col-md-10">
				<div class="mt-radio-inline">
					<label class="mt-radio mt-radio-outline"><input type="radio" name="data['.$name.'][wenda]" value="0" '.(0 == $value['wenda'] ? ' checked' : '').'> 开启(所有用户) <span></span> 
					</label>
					<label class="mt-radio mt-radio-outline"><input type="radio" name="data['.$name.'][wenda]" value="1" '.(1 == $value['wenda'] ? ' checked' : '').'> 开启(本圈用户) <span></span>
					</label>
					<label class="mt-radio mt-radio-outline"><input type="radio" name="data['.$name.'][wenda]" value="2" '.(2 == $value['wenda'] ? ' checked' : '').'> 关闭 <span></span>
					</label>
					<label class="mt-radio mt-radio-outline"><input type="radio" name="data['.$name.'][wenda]" value="3" '.(3 == $value['wenda'] ? ' checked' : '').'> 只限圈主 <span></span> 
					</label>
					<label class="mt-radio mt-radio-outline"><input type="radio" name="data['.$name.'][wenda]" value="4" '.(4 == $value['wenda'] ? ' checked' : '').'> 只限圈主 和 户组设置 <span></span>
					</label>
				</div>
			</div>
		</div>
		<div class="form-group" rs="is_admin" id="dr_'.$name.'_shangpin">
		    <label class="control-label col-md-2">商品发布</label>
			<div class="col-md-10">
				<div class="mt-radio-inline">
					<label class="mt-radio mt-radio-outline"><input type="radio" name="data['.$name.'][shangpin]" value="0" '.(0 == $value['shangpin'] ? ' checked' : '').'> 开启(所有用户) <span></span> 
					</label>
					<label class="mt-radio mt-radio-outline"><input type="radio" name="data['.$name.'][shangpin]" value="1" '.(1 == $value['shangpin'] ? ' checked' : '').'> 开启(本圈用户) <span></span>
					</label>
					<label class="mt-radio mt-radio-outline"><input type="radio" name="data['.$name.'][shangpin]" value="2" '.(2 == $value['shangpin'] ? ' checked' : '').'> 关闭 <span></span>
					</label>
					<label class="mt-radio mt-radio-outline"><input type="radio" name="data['.$name.'][shangpin]" value="3" '.(3 == $value['shangpin'] ? ' checked' : '').'> 只限圈主 <span></span> 
					</label>
					<label class="mt-radio mt-radio-outline"><input type="radio" name="data['.$name.'][shangpin]" value="4" '.(4 == $value['shangpin'] ? ' checked' : '').'> 只限圈主 和 户组设置 <span></span>
					</label>
				</div>
			</div>
		</div>
		<div class="form-group" rs="is_admin" id="dr_'.$name.'_bisai">
		    <label class="control-label col-md-2">比赛发布</label>
			<div class="col-md-10">
				<div class="mt-radio-inline">
					<label class="mt-radio mt-radio-outline"><input type="radio" name="data['.$name.'][bisai]" value="0" '.(0 == $value['bisai'] ? ' checked' : '').'> 开启(所有用户) <span></span> 
					</label>
					<label class="mt-radio mt-radio-outline"><input type="radio" name="data['.$name.'][bisai]" value="1" '.(1 == $value['bisai'] ? ' checked' : '').'> 开启(本圈用户) <span></span>
					</label>
					<label class="mt-radio mt-radio-outline"><input type="radio" name="data['.$name.'][bisai]" value="2" '.(2 == $value['bisai'] ? ' checked' : '').'> 关闭 <span></span>
					</label>
					<label class="mt-radio mt-radio-outline"><input type="radio" name="data['.$name.'][bisai]" value="3" '.(3 == $value['bisai'] ? ' checked' : '').'> 只限圈主 <span></span> 
					</label>
					<label class="mt-radio mt-radio-outline"><input type="radio" name="data['.$name.'][bisai]" value="4" '.(4 == $value['bisai'] ? ' checked' : '').'> 只限圈主 和 户组设置 <span></span>
					</label>
				</div>
			</div>
		</div>
		<div class="form-group" rs="is_admin" id="dr_'.$name.'_xiazai">
		    <label class="control-label col-md-2">下载发布</label>
			<div class="col-md-10">
				<div class="mt-radio-inline">
					<label class="mt-radio mt-radio-outline"><input type="radio" name="data['.$name.'][xiazai]" value="0" '.(0 == $value['xiazai'] ? ' checked' : '').'> 开启(所有用户) <span></span> 
					</label>
					<label class="mt-radio mt-radio-outline"><input type="radio" name="data['.$name.'][xiazai]" value="1" '.(1 == $value['xiazai'] ? ' checked' : '').'> 开启(本圈用户) <span></span>
					</label>
					<label class="mt-radio mt-radio-outline"><input type="radio" name="data['.$name.'][xiazai]" value="2" '.(2 == $value['xiazai'] ? ' checked' : '').'> 关闭 <span></span>
					</label>
					<label class="mt-radio mt-radio-outline"><input type="radio" name="data['.$name.'][xiazai]" value="3" '.(3 == $value['xiazai'] ? ' checked' : '').'> 只限圈主 <span></span> 
					</label>
					<label class="mt-radio mt-radio-outline"><input type="radio" name="data['.$name.'][xiazai]" value="4" '.(4 == $value['xiazai'] ? ' checked' : '').'> 只限圈主 和 户组设置 <span></span>
					</label>
				</div>
			</div>
		</div>
		<div class="form-group" rs="is_admin" id="dr_'.$name.'_pk">
		    <label class="control-label col-md-2">PK发布</label>
			<div class="col-md-10">
				<div class="mt-radio-inline">
					<label class="mt-radio mt-radio-outline"><input type="radio" name="data['.$name.'][pk]" value="0" '.(0 == $value['pk'] ? ' checked' : '').'> 开启(所有用户) <span></span> 
					</label>
					<label class="mt-radio mt-radio-outline"><input type="radio" name="data['.$name.'][pk]" value="1" '.(1 == $value['pk'] ? ' checked' : '').'> 开启(本圈用户) <span></span>
					</label>
					<label class="mt-radio mt-radio-outline"><input type="radio" name="data['.$name.'][pk]" value="2" '.(2 == $value['pk'] ? ' checked' : '').'> 关闭 <span></span>
					</label>
					<label class="mt-radio mt-radio-outline"><input type="radio" name="data['.$name.'][pk]" value="3" '.(3 == $value['pk'] ? ' checked' : '').'> 只限圈主 <span></span> 
					</label>
					<label class="mt-radio mt-radio-outline"><input type="radio" name="data['.$name.'][pk]" value="4" '.(4 == $value['pk'] ? ' checked' : '').'> 只限圈主 和 户组设置 <span></span>
					</label>
				</div>
			</div>
		</div>
		<div class="form-group" rs="is_admin" id="dr_'.$name.'_huodong">
		    <label class="control-label col-md-2">活动发布</label>
			<div class="col-md-10">
				<div class="mt-radio-inline">
					<label class="mt-radio mt-radio-outline"><input type="radio" name="data['.$name.'][huodong]" value="0" '.(0 == $value['huodong'] ? ' checked' : '').'> 开启(所有用户) <span></span> 
					</label>
					<label class="mt-radio mt-radio-outline"><input type="radio" name="data['.$name.'][huodong]" value="1" '.(1 == $value['huodong'] ? ' checked' : '').'> 开启(本圈用户) <span></span>
					</label>
					<label class="mt-radio mt-radio-outline"><input type="radio" name="data['.$name.'][huodong]" value="2" '.(2 == $value['huodong'] ? ' checked' : '').'> 关闭 <span></span>
					</label>
					<label class="mt-radio mt-radio-outline"><input type="radio" name="data['.$name.'][huodong]" value="3" '.(3 == $value['huodong'] ? ' checked' : '').'> 只限圈主 <span></span> 
					</label>
					<label class="mt-radio mt-radio-outline"><input type="radio" name="data['.$name.'][huodong]" value="4" '.(4 == $value['huodong'] ? ' checked' : '').'> 只限圈主 和 户组设置 <span></span>
					</label>
				</div>
			</div>
		</div>
		<div class="form-group" rs="is_admin" id="dr_'.$name.'_chuzu">
		    <label class="control-label col-md-2">出租发布</label>
			<div class="col-md-10">
				<div class="mt-radio-inline">
					<label class="mt-radio mt-radio-outline"><input type="radio" name="data['.$name.'][chuzu]" value="0" '.(0 == $value['chuzu'] ? ' checked' : '').'> 开启(所有用户) <span></span> 
					</label>
					<label class="mt-radio mt-radio-outline"><input type="radio" name="data['.$name.'][chuzu]" value="1" '.(1 == $value['chuzu'] ? ' checked' : '').'> 开启(本圈用户) <span></span>
					</label>
					<label class="mt-radio mt-radio-outline"><input type="radio" name="data['.$name.'][chuzu]" value="2" '.(2 == $value['chuzu'] ? ' checked' : '').'> 关闭 <span></span>
					</label>
					<label class="mt-radio mt-radio-outline"><input type="radio" name="data['.$name.'][chuzu]" value="3" '.(3 == $value['chuzu'] ? ' checked' : '').'> 只限圈主 <span></span> 
					</label>
					<label class="mt-radio mt-radio-outline"><input type="radio" name="data['.$name.'][chuzu]" value="4" '.(4 == $value['chuzu'] ? ' checked' : '').'> 只限圈主 和 户组设置 <span></span>
					</label>
				</div>
			</div>
		</div>
		<div class="form-group" rs="is_admin" id="dr_'.$name.'_qiuzu">
		    <label class="control-label col-md-2">求租发布</label>
			<div class="col-md-10">
				<div class="mt-radio-inline">
					<label class="mt-radio mt-radio-outline"><input type="radio" name="data['.$name.'][qiuzu]" value="0" '.(0 == $value['qiuzu'] ? ' checked' : '').'> 开启(所有用户) <span></span> 
					</label>
					<label class="mt-radio mt-radio-outline"><input type="radio" name="data['.$name.'][qiuzu]" value="1" '.(1 == $value['qiuzu'] ? ' checked' : '').'> 开启(本圈用户) <span></span>
					</label>
					<label class="mt-radio mt-radio-outline"><input type="radio" name="data['.$name.'][qiuzu]" value="2" '.(2 == $value['qiuzu'] ? ' checked' : '').'> 关闭 <span></span>
					</label>
					<label class="mt-radio mt-radio-outline"><input type="radio" name="data['.$name.'][qiuzu]" value="3" '.(3 == $value['qiuzu'] ? ' checked' : '').'> 只限圈主 <span></span> 
					</label>
					<label class="mt-radio mt-radio-outline"><input type="radio" name="data['.$name.'][qiuzu]" value="4" '.(4 == $value['qiuzu'] ? ' checked' : '').'> 只限圈主 和 户组设置 <span></span>
					</label>
				</div>
			</div>
		</div>
		<div class="form-group" rs="is_admin" id="dr_'.$name.'_zhaopin">
		    <label class="control-label col-md-2">招聘发布</label>
			<div class="col-md-10">
				<div class="mt-radio-inline">
					<label class="mt-radio mt-radio-outline"><input type="radio" name="data['.$name.'][zhaopin]" value="0" '.(0 == $value['zhaopin'] ? ' checked' : '').'> 开启(所有用户) <span></span> 
					</label>
					<label class="mt-radio mt-radio-outline"><input type="radio" name="data['.$name.'][zhaopin]" value="1" '.(1 == $value['zhaopin'] ? ' checked' : '').'> 开启(本圈用户) <span></span>
					</label>
					<label class="mt-radio mt-radio-outline"><input type="radio" name="data['.$name.'][zhaopin]" value="2" '.(2 == $value['zhaopin'] ? ' checked' : '').'> 关闭 <span></span>
					</label>
					<label class="mt-radio mt-radio-outline"><input type="radio" name="data['.$name.'][zhaopin]" value="3" '.(3 == $value['zhaopin'] ? ' checked' : '').'> 只限圈主 <span></span> 
					</label>
					<label class="mt-radio mt-radio-outline"><input type="radio" name="data['.$name.'][zhaopin]" value="4" '.(4 == $value['zhaopin'] ? ' checked' : '').'> 只限圈主 和 户组设置 <span></span>
					</label>
				</div>
			</div>
		</div>
		<div class="form-group" rs="is_admin" id="dr_'.$name.'_qiuzhi">
		    <label class="control-label col-md-2">求职发布</label>
			<div class="col-md-10">
				<div class="mt-radio-inline">
					<label class="mt-radio mt-radio-outline"><input type="radio" name="data['.$name.'][qiuzhi]" value="0" '.(0 == $value['qiuzhi'] ? ' checked' : '').'> 开启(所有用户) <span></span> 
					</label>
					<label class="mt-radio mt-radio-outline"><input type="radio" name="data['.$name.'][qiuzhi]" value="1" '.(1 == $value['qiuzhi'] ? ' checked' : '').'> 开启(本圈用户) <span></span>
					</label>
					<label class="mt-radio mt-radio-outline"><input type="radio" name="data['.$name.'][qiuzhi]" value="2" '.(2 == $value['qiuzhi'] ? ' checked' : '').'> 关闭 <span></span>
					</label>
					<label class="mt-radio mt-radio-outline"><input type="radio" name="data['.$name.'][qiuzhi]" value="3" '.(3 == $value['qiuzhi'] ? ' checked' : '').'> 只限圈主 <span></span> 
					</label>
					<label class="mt-radio mt-radio-outline"><input type="radio" name="data['.$name.'][qiuzhi]" value="4" '.(4 == $value['qiuzhi'] ? ' checked' : '').'> 只限圈主 和 户组设置 <span></span>
					</label>
				</div>
			</div>
		</div>
		
		

		';

        $str.= $strs;
        return $this->input_format($name, $text, $str);
    }



    /**
     * 字段表单显示
     *
     * @param	string	$field	字段数组
     * @param	array	$value	值
     * @return  string
     */
    public function show($field, $value = null) {

        $options = dr_format_option_array($field['setting']['option']['options']);

        $str = '<div class="form-control-static"> '.(isset($options[$value]) ? $options[$value] : dr_lang('未选择')).' </div>';

        return $this->input_format($field['fieldname'], $field['name'], $str);
    }
}